const list = [
  {
    id: 1,
    evtName: '事件2',
    appId: '1234567890',
    topicName: '事件主题2',
    sts: 'C',
    memo:"备注内容2",
    subscriberCnt:"111",
    svcId:"154",
    cron:"100"
  },
  {
    id: 2,
    evtName: '事件1',
    appId: 'abc1',
    topicName: '事件主题2',
    sts: 'F',
    memo:"备注内容1",
    subscriberCnt:"222"
  },
  {
    id: 3,
    evtName: '事件3',
    appId: 'abc1',
    topicName: '事件主题2',
    sts: 'O',
    memo:"备注内容1",
    subscriberCnt:"222"
  },
]

export default [
  // getModules
  {
    url: '/evt',
    method: 'get',
    response: ({ body }) => {
      return {
        status: 200,
        data: {
          list: list,
          total: list.length
        }
      }
    }
  },
  {
    url: '/evt',
    method: 'post',
    response: ({ body }) => {
      return {
        status: 200,
        data: {}
      }
    }
  },
  {
    url: '/evt/1',
    method: 'get',
    response: ({ body }) => {
      return {
        status: 200,
        data: list[0]
      }
    }
  },
  {
    url: '/evt/2',
    method: 'get',
    response: ({ body }) => {
      return {
        status: 200,
        data: list[1]
      }
    }
  },
  {
    url: '/evt/1',
    method: 'put',
    response: ({ body }) => {
      return {
        status: 200,
        data: list[0]
      }
    }
  },
  {
    url: '/evt/1',
    method: 'delete',
    response: ({ body }) => {
      return {
        status: 200,
        data: list[0]
      }
    }
  },
  // 上线
  {
    url: '/evt/1/sts/O',
    method: 'put',
    response: ({ body }) => {
      return {
        status: 200,
        data: list[0]
      }
    }
  },
  {
    url: '/evt/1/sts/F',
    method: 'put',
    response: ({ body }) => {
      return {
        status: 200,
        data: list[0]
      }
    }
  }
]
